home *** CD-ROM | disk | FTP | other *** search
- /*********************************************************************************
- *
- * Main Function Prototypes and constant declarations
- *
- * Main.h - C Headers
- *
- * Copyright © Apple Computer, Inc. 1988 - 1993
- * All rights reserved.
- *
- *
- * Here are declarations for all of the C routines. These are used for
- * compile-time checking of our parameters.
- *
- *********************************************************************************/
-
- #ifndef __MAINOBJ__
- #define __MAINOBJ__
-
- #include "MacHeaders.h"
-
- void initToolbox( void);
- void MainEventLoop( void);
-
-
-
- // Event-Handling routines
- void HandleEvent( EventRecord *event);
- void HandleActivate( EventRecord *event);
- void HandleDiskInsert( EventRecord *event);
- void HandleKeyPress( EventRecord *event);
- void HandleMouseDown( EventRecord *event);
- void HandleOSEvent( EventRecord *event);
- void HandleUpdate( EventRecord *event);
- void AppAdjustMenus(void);
- void AppMenu( short menu, short item);
- void AppAdjustCursor( RgnHandle cursorRgn);
- void HandleNoEvent( void);
-
- // Utility routines
-
- Boolean CloseAnyWindow( WindowPtr window);
- Boolean CloseAllAppWindows( void);
- void AppConvertScrap( void);
- void DeathAlert( short errorNumber);
- void DeathAlertStr( char *string);
- void DeathAlertStrErr( char *string, OSErr errCode);
- Boolean IsAppWindow( WindowPtr window);
- Boolean IsDAWindow( WindowPtr window);
- Boolean IsDialogWindow( WindowPtr window);
- void InvalidateScrollbars(WindowPtr theWindow);
- Boolean TrapExists(short theTrap);
- TrapType GetTrapType(short theTrap);
- short NumToolboxTraps(void);
-
- // Global variables
-
- extern SysEnvRec gMac;
- extern Boolean gQuit;
- extern Boolean gInBackground;
-
- #define true 1
- #define false 0
-
- #ifndef nil
- #define nil (void *)0
- #endif
-
- #define NIL 0L
- #define MAXLONG 0x7FFFFFFF
-
- /**************************************************************************************
-
- Define HiWrd and LoWrd macros for efficiency
-
- ***************************************************************************************/
-
- #define HiWrd(aLong) (short)(((aLong) >> 16) & 0xFFFF)
- #define LoWrd(aLong) (short)((aLong) & 0xFFFF)
-
-
- /* ================================================================================= */
- /* ========================= R E S O U R C E N U M B E R S ====================== */
- /* ================================================================================= */
-
- #define rAboutAlert 128
- #define rErrorAlert 129
- #define rErrorStrings 128
-
- #define errWimpyROMs 1
- #define errWimpySystem 2
- #define errNoMenuBar 3
- #define errWimpy68K 4
- #define errWimpyQD 5
- #define errNoThreads 6
- #define ERRORUnuseGWorld 7
-
- /* The following constants are used to identify menus and their items. The menu
- IDs have an "m" prefix and the item numbers within each menu have an "i" prefix. */
-
- #define rMenuBar 128
-
- #define mApple 128
- #define iAbout 1
-
- #define mFile 129
- #define iNew 1
- #define iOpen 2
- #define iLinell 3
- #define iClose 4
- #define iSave 5
- #define iSaveAs 6
- #define iRevert 7
- #define iLine12 8
- #define iPageSetup 9
- #define iPrint 10
- #define iLine13 11
- #define iQuit 12
-
- #define mEdit 130
- #define iUndo 1
- #define iLine21 2
- #define iCut 3
- #define iCopy 4
- #define iPaste 5
- #define iClear 6
-
- #endif
-
-